import { IParam } from '../../common';
import { IMultiEditViewPanelAbility } from '../ability';
import { ICtrlActionResult } from '../data-action';
import { IMultiEditViewPanelStore } from '../store';
import { IMDCtrlControllerBase } from './i-md-ctrl-controller-base';

/**
 * 多表单编辑面板部件控制器接口
 *
 * @export
 * @interface IMultiEditViewPanelController
 * @extends {IWidgetsController}
 */
export interface IMultiEditViewPanelController<
	S extends IMultiEditViewPanelStore,
	A extends IMultiEditViewPanelAbility
> extends IMDCtrlControllerBase<S, A> {
	/**
	 * 处理删除
	 *
	 * @param {IParam} item
	 * @return {*}  {Promise<ICtrlActionResult>}
	 * @memberof IMultiEditViewPanelController
	 */
	handleRemove(item: IParam): Promise<ICtrlActionResult>;

	/**
	 * 处理添加
	 *
	 * @return {*}  {Promise<ICtrlActionResult>}
	 * @memberof IMultiEditViewPanelController
	 */
	handleAdd(): Promise<ICtrlActionResult>;
}
